/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.click.app.dao.hibernate;

import com.click.app.dao.CategoryDao;
import com.click.app.model.LabelValue;
import com.click.app.model.Category;
import com.click.app.model.Product;
import com.click.app.model.ProductType;
import java.util.List;

/**
 *
 * @author arnold
 */
public class CategoryDaoHibernate extends GenericDaoHibernate<Category, Long> implements CategoryDao {
    List<LabelValue> categoryLabelValueList;
    public CategoryDaoHibernate() {
        super(Category.class);
    }


    public List<Category> findById(Long id) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public List<Category> findCategoryByProductType(ProductType productType) {
       List listCategorys = getHibernateTemplate().find("from Category where productType=?", productType);
       return listCategorys;
    }

}

